"use strict"
/**
 *
 * @param {import("egg").Application} app
 */
module.exports = app => {
	const Sequelize = app.Sequelize
	const sequelize = app.model
	let Application = sequelize.models.Application
	let Module = sequelize.models.Module
	let ModuleApplicat = sequelize.define("moduleApplicat", {
		aid: {
			type: Sequelize.INTEGER,
			comment: "应用的id 关联applicat",
			references: {
				model: Application
			},
			unique:"maid1",
		},
		mid: {
			type: Sequelize.INTEGER,
			comment: "模块的id //可以  1 模块 对 1  应用",
			references: {
				model: Module
			},
			unique:"maid1",
		},
		stat: {
			type: Sequelize.TINYINT
		},
	}, {
		tableName: "module_application",
		timestamps: false
	})
	return ModuleApplicat
}

